//
//  SimpleTextInput.h
//  iPadMenuNew
//
//  Created by siloon on 4/8/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import "SLFoundation.h"

@class SLSimpleTextInput;

@protocol SLSimpleTextInputDelegate <NSObject>

@required
- (BOOL)input:(SLSimpleTextInput *)textInput shouldDismissWithText:(NSString *)text;
- (void)input:(SLSimpleTextInput *)textInput didDismissWithText:(NSString *)text;

@end

@interface SLSimpleTextInput : NSObject <UITextFieldDelegate, UIAlertViewDelegate>{
	UILabel *tipLabel;
	UITextField *textField;
	
	UIAlertView *alert;
}

@property (nonatomic,copy) NSString *title;
@property (nonatomic,copy) NSString *tip;
@property (nonatomic) BOOL canCancel;
@property (nonatomic,assign) id<SLSimpleTextInputDelegate> delegate;

- (id)initWithDelegate:(id<SLSimpleTextInputDelegate>)delegate;

- (void)showWithTitle:(NSString *)title message:(NSString *)tip buttons:(BOOL)canCancel;

@end
